function addMenu() {
    curl -XPOST -H "Content-Type: application/json" -d '{"name":"123","route":"/index","parentId":""}' "http://localhost:8000/menu/updateOrAddMenu"
}

#添加菜单
function addMenu1() {
    data='{"name":"二级2","route":"/index","parentId":"2"}'
    url=/menu/addMenu
}


function update() {
    curl -XPOST -H "Content-Type: application/json" -d '{"id":"2","name":"1","route":"/index1","parentId":""}' "http://localhost:8000/menu/updateOrAddMenu"
}


function del() {
    curl -XPOST -H "Content-Type: application/json" -d '{"id":"1","isDel":"1"}' "http://localhost:8000/menu/delMenu"
}

# 获取二级列表
function subordinate() {
    curl -XPOST -H "Content-Type: application/json" -d '{"pid":"2"}' "http://localhost:8000/menu/subordinate"
}


# 管理员登录
function adminLogin() {
    curl -XPOST -H "Content-Type: application/json" -d '{"pwd":"123","phone":"18023801026"}' "http://localhost:8000/login/login"
}
#权限
function menuTest() {
    curl -s -XPOST "http://localhost:8000/login/test" -H "STOKEN=XXXXX" -H "COOKIE: TOKEN=e150bc10369ba230b2edfea0ea8d2845"
}
function menuTest1() {
    curl -s -XPOST "http://localhost:8000/menu/addMenu" -H "STOKEN=XXXXX" -H "COOKIE: TOKEN=e150bc10369ba230b2edfea0ea8d2845"
}

$1
#curl -XPOST -H "Content-Type: application/json" -d "$data" "http://localhost:8000$url"


